package cn.mw.cmdb.entity;

import cn.mw.components.mongodb.anno.CMDBProperty;
import cn.mw.components.mongodb.anno.CMDBRelations;
import lombok.Data;
import org.springframework.data.annotation.Transient;

@Data
public class ModelTemplateInfoExpand {
    //资产类型
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @CMDBRelations(targetClass = ModelGroupInfo.class, targetField = "name", localField = "modelGroupId", foreignField = "_id")
    private String modelGroupName;
    //资产子类型
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @CMDBRelations(targetClass = ModelInfo.class, targetField = "modelName", localField = "modelId", foreignField = "_id")
    private String modelName;
    //厂商名称
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @CMDBRelations(targetClass = ModelVendorInfo.class, targetField = "vendorCN", localField = "brandId", foreignField = "_id")
    private String brand;
    //规格型号
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @CMDBRelations(targetClass = ModelSpecificationInfo.class, targetField = "specification", localField = "specificationId", foreignField = "_id")
    private String specification;
    //监控协议
    @Transient
    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    private String monitorModeName;
}
